﻿@model IEnumerable<DLM.Domain.DTO.FriendDTO>
@using DLM.Domain.Model;
@using Webdiyer.WebControls.Mvc;
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
@*    <script type="text/javascript">
        $(document).ready(function () {
            $("ul.clearfix li").mouseover(function () {

                $(this).addClass("hover");
            });
            $("ul.clearfix li").mouseout(function () {

                $(this).removeClass("hover");
            });
            $("a").css("cursor", "pointer");
        });
    </script>*@
<h3>
    历史记录<a>总共 @Model.Count() 条</a></h3>
<div class="tr clearfix">
    <div class="friend_list">
        <ul class="clearfix">
            @foreach (var item in Model)
            {
                <li><a href="#">
                  @if (item.FriednPhoto == "none_75_75.png")
                  {
                                        <img src="@Url.Content("~/Content/ad/none_75_75.png")" alt="头像" height="77px" width="77px"/>
                  }
                  else
                  { 
                   <img src="@Url.Content("~/Files/Photos/" + item.MyFriendID + "/Title/" + item.FriednPhoto)" />
                  }
                   </a>
                    <p>
                        <a href="#">@item.FriendAccount</a></p>
                    <span><a href="@Url.Action("View", "User", new { id = item.MyFriendID })">查看资料</a>@*|<a
                        href="#">删除好友</a>*@</span> </li>
                
            }
        </ul>
        <div class="paging">
        @Ajax.Pager(Model as PagedList<DLM.Domain.DTO.FriendDTO>, new PagerOptions
{
    PageIndexParameterName = "historyid",
    CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>",
    //NumericPagerItemWrapperFormatString = "<a>{0}</a>",
    PrevPageText = "<",
    NextPageText = ">",
    ShowNumericPagerItems = true,
    ShowFirstLast = false,
    ShowPrevNext = true,
    CssClass = "scott",
    MorePageText = "...",
    SeparatorHtml = ""
},
        new AjaxOptions { UpdateTargetId = "divHistory" }
    )
    </div>
</div>
</div>
